package ControlLayer;
import ModelLayer.*;
import java.util.ArrayList;
//model layer package has to be imported
/**
 * Controller class for the Dvd collection
 * 
 * @author (kbh) 
 * @version (2005.03.31)
 * @revised version English (Ab)
 * (FEN): 2006.03.21: Some changes to the architecture in order to assure layering
 *                    and loose coupling
 */
public class DVDCtr
{
    private DvdCollection dvc;
    private DVD dv;
    
    public DVDCtr()
    {
       dvc = DvdCollection.getInstance();
    }
    
    
    public DVD findDvd(String title)
    {
       DVD found = dvc.findDvd(title);
       
       return found; 
    }
    
    public void createDvd(int Id,String title, String artist,String releaseDate)
    {       
        DVD d = new DVD(Id, title, artist, releaseDate);
        dvc.addDvd(d);
    }
    
    public void deleteDvd(String title)
    {
        DVD delete = findDvd(title);
        dvc.deleteDvd(delete);
        
    }
    
    public void createCopy(int copySerialNumber, String copyAcquisitionDate, int copyAcquisitionPrice)
    {
        Copy c = new Copy(copySerialNumber, copyAcquisitionDate, copyAcquisitionPrice);
        
    }
    
    
    public ArrayList listAllDvds()
    {
          return dvc.getAll();
    }
}
